.class public Lcom/zuiapps/sdk/analytics/helper/SecrHelper;
.super Ljava/lang/Object;
.source "SecrHelper.java"


# static fields
.field private static final MD5_SIGN:Ljava/lang/String; = "^%FGR^%$D%$E%$niceapp"


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 13
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static makeTokenByNice(Ljava/lang/String;)Lcom/zuiapps/sdk/analytics/helper/Token;
    .registers 9
    .param p0, "uid"    # Ljava/lang/String;

    .prologue
    .line 17
    new-instance v1, Lcom/zuiapps/sdk/analytics/helper/Token;

    invoke-direct {v1}, Lcom/zuiapps/sdk/analytics/helper/Token;-><init>()V

    .line 18
    .local v1, "token":Lcom/zuiapps/sdk/analytics/helper/Token;
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v4

    invoke-virtual {v4}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v4

    const-wide/16 v6, 0x3e8

    div-long/2addr v4, v6

    long-to-int v4, v4

    int-to-long v2, v4

    .line 19
    .local v2, "timestamp":J
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ""

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "^%FGR^%$D%$E%$niceapp"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/sdk/analytics/util/ZMMD5Util;->crypt(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 21
    .local v0, "secr":Ljava/lang/String;
    invoke-virtual {v1, v0}, Lcom/zuiapps/sdk/analytics/helper/Token;->setSecr(Ljava/lang/String;)V

    .line 22
    invoke-virtual {v1, v2, v3}, Lcom/zuiapps/sdk/analytics/helper/Token;->setTimestamp(J)V

    .line 23
    invoke-virtual {v1, p0}, Lcom/zuiapps/sdk/analytics/helper/Token;->setUid(Ljava/lang/String;)V

    .line 25
    return-object v1
.end method
